package com.kila.factorybean;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

public class MyAsapect implements MethodInterceptor {

    public void check_Permission(){
        System.out.println("模拟检查权限");
    }

    public void log(){
        System.out.println("模拟日志记录");
    }

    @Override
    public Object invoke(MethodInvocation methodInvocation) throws Throwable {
        check_Permission();
        Object obj =  methodInvocation.proceed();
        log();
        return obj;
    }
}
